import java.util.ArrayList;
import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: mirac
 * Date: 2025-07-31
 * Time: 21:54
 */
public class Main_1 {
    public static void main(String[] args) {
        ArrayList<Integer> arrayList = new ArrayList<>(10);
        arrayList.add(1);
        arrayList.add(2);
        arrayList.add(3);
        arrayList.add(4);
        arrayList.add(5);
        System.out.println(arrayList);
        List<Integer> arrayList1 = arrayList.subList(0,2);
        System.out.println(arrayList1);

        arrayList1.set(0,99);
        System.out.println(arrayList);
        System.out.println(arrayList1);
    }
}
